CXX = g++
CXXFLAGS = -g -Wall

LIB_DIR = ../../lib
MATH_DIR = ../../src/Math

SRCS = FixedTest.cpp $(MATH_DIR)/Fixed.cpp
OBJS = FixedTest.o Fixed.o
LIBS = $(LIB_DIR)/libuavtest.a

TARGET = fixed_test

.PHONY: all
all: depend $(TARGET)

-include depend

$(TARGET): $(OBJS) $(LIBS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(CXXFLAGS)

depend: $(SRCS)
	$(CXX) -MM $(CXXFLAGS) $^ > $@

$(OBJS): $(SRCS)
	$(CXX) -c $(SRCS) $(CXXFLAGS)

.PHONY: clean
clean:
	rm -f *.o $(TARGET)

.PHONY: clean-depend
clean-depend:
	rm depend
